#ifndef VENUS_EFFECTS_REFLECTION_EFFECT_H
#define VENUS_EFFECTS_REFLECTION_EFFECT_H

#include "effect.h"
#include "graphics/color.h"
#include "graphics/error_gl.h"

namespace venus {
class Point;
class ReflectionEffect : public Effect {
 public:
  ReflectionEffect(float reflection_factor);
  virtual void Begin() const;
  virtual void End() const;
  void set_env_map(int env_map) { env_map_ = env_map; }
  void set_eye_pos(const Point *eye_pos) { eye_pos_ = eye_pos; }
  void set_material_color(const Colorf *material_color) {
    material_color_ = material_color;
  }
  float reflection_factor() const { return reflection_factor_; }
  void set_reflection_factor(float reflection_factor) {
    reflection_factor_ = reflection_factor;
    Info("reflection factor: %f", reflection_factor_);
  }
 private:
  const Point *eye_pos_;
  const Colorf *material_color_;
  float reflection_factor_;
  int env_map_;

  GLint eye_pos_var_;
  GLint material_color_var_;
  GLint env_map_var_;
  GLint reflection_factor_var_;
};
} // namespace venus

#endif // VENUS_EFFECTS_REFLECTION_EFFECT_H
